ExternalPlugin: Add playhead tracking for external plugins#474
Open
gijzelaerr wants to merge 7 commits intospotify:masterfrom
Open
ExternalPlugin: Add playhead tracking for external plugins#474gijzelaerr wants to merge 7 commits intospotify:masterfrom
gijzelaerr wants to merge 7 commits intospotify:masterfrom
Conversation
The currentPositionInfo member was never explicitly initialized, leaving its fields with undefined values. Plugins that query the playhead during initialization (e.g., VST3 preset loading) would read garbage values, causing issues like incorrect gain (0.5 instead of 1.0). Initialize all fields to standard defaults (120 BPM, 4/4 time, position 0, not playing) before any plugin loading or setPlayHead(this) calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two issues fixed: 1. getPreset() now flushes pending parameter changes by calling processBlock with a minimal buffer before reading preset data. VST3 plugins defer parameter state synchronization until the audio processing callback, so without this flush, preset_data would contain stale parameter values. 2. Removed the extra processBlock "pump" from the audio effect processing path. This empty-buffer pump was clearing the internal state of effects like CHOWTapeModel's tape delay, breaking the reset=False behavior where tail audio should persist between calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
currentPositionInfo) for external VST3/AU plugins, reporting the current time in samples during processingThis is a rebased version of @psobot's PR #301. All credit for the implementation goes to @psobot.
Fixes #295
Test plan
tests/test_external_plugins.py)🤖 Generated with Claude Code